# -*- coding: utf-8 -*-
"""
Created on Sun Sep  8 09:35:39 2024

@author: LENOVO
"""

# -*- coding: utf-8 -*-
"""
Created on Fri Sep  6 10:22:26 2024

@author: LENOVO
"""

# -*- coding: utf-8 -*-
"""
Created on Thu Sep  5 19:36:07 2024

@author: LENOVO
"""

import matplotlib.pyplot as plt
import numpy as np
from sympy import *
from scipy.optimize import root, fsolve
import pandas as pd

a=np.array([2.71185586,0.27602683,1.34716882,2.16092244,2.09427695,1.16731998,-0.340554,-1.97485611,-2.71185586])
b=np.array([2.71185586,2.09229905,0.83724733,-0.59812894,-2.24678245,-3.61179189,-4.28172924,-4.05466843,-3.59107752])

# ax=plt.subplot(111, polar=True)
# ax.set_theta_direction(-1)
plt.plot(a,b,lw=1,c='r', label='原始数据点')
plt.legend()
plt.title('非线性最小二乘拟合')
plt.grid()  
plt.show()